#include <bits/stdc++.h>
using namespace std;
const int maxn = 20;
double d[(1<<20)+5], P[20+2];

int n;

int main() {
    ios::sync_with_stdio(false);cin.tie(nullptr);
    cin >> n;
    for (int i = 1; i <= n; ++i) {
        cin >> P[i];
    }
    d[(1<<n)-1] = 0;
    for (int s = (1<<n)-2; s >=0; --s) {
        double pi = 0;
        for (int i = 1; i <= n; ++i) {
            int is = 1<<(i-1);
            if(is & s)
                pi += P[i];
        }
        d[s] = 1;
        for (int j = 1; j <= n; ++j) {
            int js = 1<<(j-1);
            if((js & s) == 0)
                d[s] += P[j]*d[s|js];
        }
        d[s] /=(1-pi);
    }

    cout << d[0];
    return 0;
}